﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NGourd.Core.Features
{
    internal class Scenario : IScenario
    {
        public Scenario(string name)
        {
            Name = name;
        }

        private readonly IList<Step> _steps = new List<Step>();

        internal IEnumerable<Step> AllSteps
        {
            get
            {
                return _steps;//.Select(s => s.Text);
            }
        }

        #region IScenario Members

        public string Name
        {
            get;
            private set;
        }

        public IScenario Given(string text)
        {
            _steps.Add(new Step("Given " + text));
            return this;
        }

        public IScenario When(string text)
        {
            _steps.Add(new Step("When " + text));
            return this;
        }

        public IScenario Then(string text)
        {
            _steps.Add(new Step("Then " + text));
            return this;
        }

        public IScenario And(string text)
        {
            _steps.Add(new Step("And " + text));
            return this;
        }

        #endregion
    }
}
